package com.addplus.townmall.server.api.service.web.authoritymodule;

import com.addplus.townmall.server.api.model.authority.MenuFunction;
import com.addplus.townmall.server.api.model.authority.ext.MenuFunctionUser;
import com.addplus.townmall.server.api.model.authority.ext.RoleMenuFunctionUser;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * 类名: MenuService
 *
 * @author zhangjiehang
 * @version V1.0
 * @date 2017/12/4 上午11:35
 * @description 类描述: 菜单的增删改查
 */
public interface MenuFunctionService {

    MenuFunction getMenuFunction(Integer id) throws Exception;

    Page<MenuFunctionUser> getMenuFunctionByPage(Integer pageNo, Integer pageSize) throws Exception;

    Page<MenuFunctionUser> getMenuPageByType(Integer pageNo, Integer pageSize, Integer type) throws Exception;

    Page<RoleMenuFunctionUser> getMenuFunctionByPageWithRole(Integer pageNo, Integer pageSize, Integer roleId) throws Exception;

    Boolean updateMenuFunctionById(MenuFunction menuFunction) throws Exception;

    Boolean deleteMenuFunctionById(Integer id) throws Exception;

    MenuFunction addMenuFunction(MenuFunction menuFunction) throws Exception;

    Page<MenuFunction> searchMenuFunctionByName(String name, Integer pageNo, Integer pagesize, String pid) throws Exception;

    Page<MenuFunction> getMenuFunctionListByPage(Integer pageNo, Integer pageSize) throws Exception;

    Integer refreshMenu();

    /**
     * 刷新权限
     *
     * @return
     * @throws Exception
     */
    Boolean refreshAuthority() throws Exception;
}
